<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/index.css">
</head>
<body>

    <!--头部-->
    <header id="header">
        <div class="log1">
            <a href="#"><img src="./assets/img/header_logo.png" alt=""></a>
        </div>
        <div class="log2">
            <a href="#"><img src="./assets/img/header_app.png" alt=""></a>
        </div>
    </header>

    <!--搜索-->
    <section id="sec">
        <div class="ipt">
            <input type="text" name="" placeholder="请输入产品名称">
        </div>
        <div class="bt">
            <button>搜索</button>
        </div>
    </section>

    <!--菜单-->
    <nav id="nav">
               <!-- <div>
                   <a href="">
                   <img src="./assets/img/ic_search.png" alt="">
                   <p>比价搜索</p>
                    </a>
                </div>
               <div>
                   <img src="./assets/img/ic_cu.png" alt="">
                    <p>省钱控</p>
                </div>
               <div>
                   <img src="./assets/img/ic_coudanpin.png" alt="">
                    <p>国内折扣</p>
                </div>
               <div>
                   <img src="./assets/img/ic_bcj.png" alt="">
                    <p>白菜价</p>
                </div>
               <div>
                   <img src="./assets/img/haitao.png" alt="">
                    <p>海淘折扣</p>
                </div>
               <div>
                   <img src="./assets/img/ic_temai.png" alt="">
                    <p>优惠券</p>
                </div>
               <div>
                   <img src="./assets/img/ic_trend.png" alt="">
                    <p>查历史价</p>
                </div>
               <div>
                   <img src="./assets/img/gengduo.png" alt="">
                    <p>更多</p>
                </div>
               <div>
                   <img src="./assets/img/ic_coudanpin.png" alt="">
                    <p>凑单品</p>
                </div>
               <div>
                   <img src="./assets/img/ic_kb.png" alt="">
                    <p>口碑排行</p>
                </div>
               <div>
                   <img src="./assets/img/ic_mall.png" alt="">
                    <p>商城导航</p>
                </div>
               <div>
                   <img src="./assets/img/ic_pp.png" alt="">
                    <p>品牌大全</p>
                </div>
        </div> -->
    </nav>

    <!--折扣推荐-->
    <section id="disc">
        <span class="s1">超值折扣推荐</span>
        <a href="">
            <img src="./assets/img/icon-right.jpg" alt="">
        </a>
    </section>

    <!--商品-->
    <section id="product">
        <ul class="info">
            
        </ul>

    </section>

    <!--底部-->
    <section id="footer">
        <div class="more">
            <a href="">更多优惠信息>></a>
        </div>
        <div class="cc">
            <span class="s1">品牌排行</span>
            <span class="s2">
                <img src="./assets/img/icon-right.jpg" alt="">
            </span>
        </div>
        <div class="login">
            <div class="container">
                <div class="row">
                    <a href="">
                        <div>登入</div>
                    </a>
                    <a href="">
                        <div>注册</div>
                    </a>
                    <a href="">
                        <div>返回顶部</div>
                    </a>
                </div>
            </div>
            <div class="content_b">
                <p>
                    <a href="">手机app下载</a>
                    <a href="">慢慢买手机版</a>
                    <a href="">--掌上比价平台</a>
                </p>
                <p>m.manmanbuy.com</p>
            </div>
        </div>
    </section>









</body>
<script src="http://unpkg.com/jquery"></script>
<script>
    $.get("http://chst.vip:1234/api/getindexmenu",{},res=>{
        let html=``
        $.each(res.result,(index,item)=>{
            html+=`
             <div>
                   <a href="${item.titlehref}">
                   ${item.img.replace('images',"./assets/img")}
                   <p>${item.name}</p>
                    </a>
                </div>`
                
        })
        $('#nav').html(html)
    },'json')

    $.get("http://chst.vip:1234/api/getmoneyctrl",{},res=>{
      let html=``
      $.each(res.result,(index,item)=>{
        //   console.log(this);
          html+=`<li>
        <a href="indexXiang.html?productid=${item.productId}" class="clearfix">
            <div class="img fl">
                ${item.productImgSm}
            </div>
            <div class="infoR">
                <div class="title">
                    <h4>${item.productName}
                        <span>${item.productPinkage}</span>
                    </h4>
                </div>
                <div class="other">
                    <span class="mall fl">${item.productFrom}     |${item.productTime}</span>

                    <em class="fr">
                        <i class="iconfont icon-xiaoxi ">

                        </i>
                        <span> ${item.productComCount}</span>
                    </em>

                </div>

            </div>
        </a>
    </li>
    <hr>`
      })
      $(".info").html(html)
    },'json')
    $('#nav').on('click','img',function(){


    })
</script>
</html>